layui.define(['table', 'articleApi'], function(exports) {
    var articleApi = layui.articleApi;
    var table=layui.table;
    var view = {
        init:function(){
        },
        delBatch:function(id){
        	if (id) {
        		Common.openConfirm("确认要删除内容?", function() {
					articleApi.del(id, function() {
						Common.info("删除成功");
						dataReload();
					})
				})
        	} else {
        		 var data = Common.getMoreDataFromTable(table,"articleTable");
                 if(data==null){
                     return ;
                 }
                 Common.openConfirm("确认要删除这些内容?",function(){
                 var ids =Common.concatBatchId(data,"id");
                 articleApi.del(ids,function(){
                     Common.info("删除成功");
                         dataReload();
                     })
                 })
        	}
           
        }
    }
    exports('del',view);
	
});